package com.yuw.annotation;

import java.util.Date;

public class Student {

	// 属性
	// 成员变量
	private String stuName;
	private String stuSex;
	private double stuScore;

	// 行为
	/**
	 * 学习行为
	 */
	@MyAnnotation(myName="张三",myCources = {"数据结构","计算机网络","操作系统"})
	public void doStuding() {
		System.out.println(this.stuName + " is studing...");		
	}

	/**
	 * 学习行为,重载方法
	 */
	public void doStuding(String where, Date time) {
		System.out.println(this.stuName + " is studing at " + where + " at " + time.toLocaleString());
	}

	/**
	 * 学习行为,重载方法,带有返回值
	 */
	public int doStuding(Date time, String where) {
		System.out.println(this.stuName + " is studing at " + where + " at " + time.toLocaleString());
		return 1;
	}

	public Student(String stuName, String stuSex, double stuScore) {
		super();
		this.stuName = stuName;
		this.stuSex = stuSex;
		this.stuScore = stuScore;

	}

	public Student() {
		super();
		// TODO Auto-generated constructor stub
	}

	public String getStuName() {
		return stuName;
	}

	public void setStuName(String stuName) {
		this.stuName = stuName;
	}

	public String getStuSex() {
		return stuSex;
	}

	public void setStuSex(String stuSex) {
		this.stuSex = stuSex;
	}

	public double getStuScore() {
		return stuScore;
	}

	public void setStuScore(double stuScore) {
		this.stuScore = stuScore;
	}

	@Override
	public String toString() {
		return "Student [stuName=" + stuName + ", stuSex=" + stuSex + ", stuScore=" + stuScore + "]";
	}

}
